home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 285_03 / unixmake.mak < prev    next >
Encoding:
Text File  |  1990-07-08  |  3.4 KB  |  100 lines

  1. # Makefile for bison
  2. #   Copyright (C) 1984 Bob Corbett and Free Software Foundation, Inc.
  3.  
  4. #BISON is distributed in the hope that it will be useful, but WITHOUT ANY
  5. #WARRANTY.  No author or distributor accepts responsibility to anyone
  6. #for the consequences of using it or for whether it serves any
  7. #particular purpose or works at all, unless he says so in writing.
  8. #Refer to the BISON General Public License for full details.
  9.  
  10. #Everyone is granted permission to copy, modify and redistribute BISON,
  11. #but only under the conditions described in the BISON General Public
  12. #License.  A copy of this license is supposed to have been given to you
  13. #along with BISON so you can know your rights and responsibilities.  It
  14. #should be in a file named COPYING.  Among other things, the copyright
  15. #notice and this notice must be preserved on all copies.
  16.  
  17. # In other words, you are welcome to use, share and improve this program.
  18. # You are forbidden to forbid anyone else to use, share and improve
  19. # what you give them.   Help stamp out software-hoarding!  */
  20.  
  21.  
  22. # For sysV, you must uncomment the following lines
  23. #CFLAGS = -g -DUSG
  24. #LIBS = -lPW
  25. #and comment out the assignment of CFLAGS below.
  26. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  27. #so the system's getopt will be used.
  28.  
  29.  
  30. DESTDIR=
  31. # where the installed binary goes
  32. BINDIR = $(DESTDIR)/usr/local/bin
  33.  
  34. # where the parsers go
  35. PARSERDIR = $(DESTDIR)/usr/local/lib
  36.  
  37. # names of parser files
  38. PFILE = bison.simple
  39. PFILE1 = bison.hairy
  40.  
  41. # It is unwise ever to compile a program without symbols.
  42. CFLAGS = -g
  43.  
  44. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  45.      -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  46.  
  47. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  48.       getargs.o gram.o lalr.o                    \
  49.       lex.o main.o nullable.o output.o print.o reader.o symtab.o    \
  50.       warshall.o                            \
  51.       getopt.o
  52.  
  53. start: bison
  54.  
  55. clean:
  56.     rm -f *.o core bison
  57.  
  58. install: bison
  59.     install bison $(BINDIR)
  60.     cp $(PFILE) $(PFILE1) $(PARSERDIR)
  61.  
  62. bison: $(OBJECTS)
  63.     $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  64.  
  65. dist:    bison-dist.tar bison-dist.tar.Z
  66.  
  67. .PHONY: bison-dist.tar
  68. bison-dist.tar:
  69.     tar chvf bison-dist.tar \
  70.         COPYING Makefile REFERENCES bison.1 bison.simple bison.hairy \
  71.         LR0.c allocate.c closure.c conflicts.c \
  72.         derives.c files.c getargs.c gram.c lalr.c lex.c main.c \
  73.         nullable.c output.c print.c reader.c symtab.c warshall.c \
  74.         files.h gram.h lex.h machine.h new.h state.h symtab.h types.h \
  75.         bison.cld build.com vmsgetargs.c vmshlp.mar README \
  76.         bison.texinfo bison.info* \
  77.         -C ../lib getopt.c
  78. bison-dist.tar.Z: bison-dist.tar
  79.     compress < bison-dist.tar > bison-dist.tar.Z
  80.  
  81. # This file is different to pass the parser file names
  82. # to the compiler.
  83. files.o: files.c files.h new.h gram.h
  84.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  85.  
  86. LR0.o: machine.h new.h gram.h state.h
  87. closure.o: machine.h new.h gram.h
  88. conflicts.o: machine.h new.h files.h gram.h state.h
  89. derives.o: new.h types.h gram.h
  90. getargs.o: files.h
  91. lalr.o: machine.h types.h state.h new.h gram.h
  92. lex.o: files.h symtab.h lex.h
  93. main.o: machine.h
  94. nullable.o: types.h gram.h new.h
  95. output.o: machine.h new.h files.h gram.h state.h
  96. print.o: machine.h new.h files.h gram.h state.h
  97. reader.o: files.h new.h symtab.h lex.h gram.h
  98. symtab.o: new.h symtab.h gram.h
  99. warshall.o: machine.h
  100.